home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / XML Quik Builder1.5 / XML Quik Builder1.5.msi / Cabs.w1.cab / XQBHelp.chm1 / po_tutorial.htm < prev    next >
Encoding:
Extensible Markup Language  |  2002-06-27  |  9.5 KB  |  129 lines

  1. <html>
  2.  
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  5. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  6. <meta name="ProgId" content="FrontPage.Editor.Document">
  7. <title>This is a tutorial that will walk you through the application in creating
  8. a Valid XML given an XSD from dynamic GUI</title>
  9. </head>
  10.  
  11. <body><script language="javascript">
  12. if (window.name != "content")
  13.     document.write("<center><a href='index.html?page=PO_Tutorial.htm'>show framing</a></center>")
  14. </script>
  15.  
  16. <p>This is a tutorial that will walk you through the application in creating a <b>Valid
  17. XML</b> given an XSD from dynamic GUI</p>
  18. <p><font color="#800000"><b>Sample XSD </b></font>(purchase order) </p>
  19. <blockquote>
  20.   <p><font size="2"><?xml version="1.0"?><br>
  21.   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> </font></p>
  22.   <p><font size="2">    <!--Stock Keeping Unit, a code for identifying products--><br>
  23.       <xs:annotation><br>
  24.           <xs:documentation xml:lang="en">Purchase order schema for Example.com.Copyright 2000 Example.com. All rights
  25.   reserved.</xs:documentation><br>
  26.       </xs:annotation><br>
  27.       <xs:complexType name="PurchaseOrderType"><br>
  28.           <xs:sequence><br>
  29.               <xs:element name="shipTo" type="USAddress"></xs:element><br>
  30.               <xs:element name="billTo" type="USAddress"></xs:element><br>
  31.               <xs:element ref="comment" minOccurs="0"></xs:element><br>
  32.               <xs:element name="items" type="Items"></xs:element><br>
  33.           </xs:sequence><br>
  34.           <xs:attribute name="orderDate" type="xs:date"></xs:attribute><br>
  35.           <xs:attribute name="select" type="xs:boolean"></xs:attribute><br>
  36.       </xs:complexType><br>
  37.       <xs:element name="purchaseOrder" type="PurchaseOrderType"></xs:element><br>
  38.       <xs:element name="comment" type="xs:string"></xs:element><br>
  39.       <xs:complexType name="USAddress"><br>
  40.           <xs:sequence><br>
  41.               <xs:element name="name" type="xs:string"></xs:element><br>
  42.               <xs:element name="street" type="xs:string"></xs:element><br>
  43.               <xs:element name="city" type="xs:string"></xs:element><br>
  44.               <xs:element name="state" type="xs:string"></xs:element><br>
  45.               <xs:element name="zip" type="xs:decimal"></xs:element><br>
  46.           </xs:sequence><br>
  47.           <xs:attribute name="country" type="xs:NMTOKEN" fixed="US"></xs:attribute><br>
  48.       </xs:complexType><br>
  49.       <xs:complexType name="Items"><br>
  50.           <xs:sequence><br>
  51.               <xs:element name="item" minOccurs="0" maxOccurs="unbounded"><br>
  52.                  
  53.   <xs:complexType><br>
  54.                      
  55.   <xs:sequence><br>
  56.                         
  57.   <xs:element name="productName" type="xs:string"></xs:element><br>
  58.                          
  59.   <xs:element name="quantity"><br>
  60.                               
  61.   <xs:simpleType><br>
  62.                                  
  63.   <xs:restriction base="xs:positiveInteger"><br>
  64.                                      
  65.   <xs:maxExclusive value="100"></xs:maxExclusive><br>
  66.                                  
  67.   </xs:restriction><br>
  68.                              
  69.   </xs:simpleType><br>
  70.                          
  71.   </xs:element><br>
  72.                          
  73.   <xs:element name="USPrice" type="xs:decimal"></xs:element><br>
  74.                          
  75.   <xs:element ref="comment" minOccurs="0"></xs:element><br>
  76.                          
  77.   <xs:element name="shipDate" type="xs:date" minOccurs="0"></xs:element><br>
  78.                      
  79.   </xs:sequence><br>
  80.                      
  81.   <xs:attribute name="partNum" type="SKU" use="required"></xs:attribute><br>
  82.                  
  83.   </xs:complexType><br>
  84.               </xs:element><br>
  85.           </xs:sequence><br>
  86.       </xs:complexType><br>
  87.       <xs:simpleType name="SKU"><br>
  88.           <xs:restriction base="xs:string"><br>
  89.                  
  90.   <xs:pattern value="\d{3}-[A-Z]{2}"></xs:pattern><br>
  91.           </xs:restriction><br>
  92.       </xs:simpleType><br>
  93.   </xs:schema></font></p>
  94. </blockquote>
  95. <p><font color="#800000"><b>Steps</b></font>:</p>
  96. <p>1. From <b>File->New Project</b> select <b>Samples</b>, click Next and select
  97. <b>PurchaseOrder</b>.</p>
  98. <p><img border="0" src="jpeg/newproject.gif" width="659" height="445"></p>
  99. <p>2. Click <b>Create</b>.  Dynamic GUI with empty XML document opens as shown below. 
  100. The default values show in blue color.  complexTypes are shown in red which
  101. are always group boxes.  The Notepad symbol is useful for editing multiline
  102. input.  When the focus is in a Textbox, clicking this icon will open an
  103. edit window. Reference elements are shown in green color.  These color
  104. settings can be customized by user.</p>
  105. <p><img border="0" src="jpeg/guistart.gif" width="638" height="420"></p>
  106. <p>3. Fill up the data as shown below for the first tab (shipTo)</p>
  107. <p><img border="0" src="jpeg/shipto.gif" width="633" height="418"></p>
  108. <p>4. Move to second tab (billTo) and fill data as shown below</p>
  109. <p><img border="0" src="jpeg/billto.gif" width="631" height="417"></p>
  110. <p>5. Move to items tab and add first item by entering the data below.</p>
  111. <p><img border="0" src="jpeg/items1.gif" width="628" height="418"></p>
  112. <p>6. Create one more item by clicking <b>New</b></p>
  113. <p><img border="0" src="jpeg/items2.gif" width="636" height="419"></p>
  114. <p>7. Change the file to po.xml by selecting <b>Rename </b>button</p>
  115. <p><img border="0" src="jpeg/rename.gif" width="636" height="416"></p>
  116. <p>8. <b>Save</b> the file </p>
  117. <p><img border="0" src="jpeg/save.gif" width="644" height="419"></p>
  118. <p>9. Close the application by pressing <b>Close.  </b>Select <b>Files</b>
  119. icon on the left extreme and this will show the Data files folder.  Right
  120. click on this view and select <b>Refresh.  </b><i>po.xml </i>is shown in
  121. the list.</p>
  122. <p><img border="0" src="jpeg/filesview.gif" width="279" height="421"></p>
  123. <p>10. Double Clicking the <i>po.xml</i> opens the XML in GUI as shown below.</p>
  124. <p><img border="0" src="jpeg/finalopen.gif" width="1023" height="730"></p>
  125.  
  126. </body>
  127.  
  128. </html>
  129.